<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组 对象</title>
</head>
<body>
<script>
    var array=new Array(4);
    var fruit=new Array("apple", "orange", " peach","banana");
    var fruit1=new Array(4);
    fruit1[0]="apple";
    fruit1[1]="orange";
    fruit1[2]="peach";
    fruit1[3]="banana";
    document.write("fruit:"+fruit+"<br/>");
    document.write("fruit1:"+fruit+"<br/>");
    document.write("fruit[0]:"+fruit[0]+"<br/>");
    document.write("fruit1[0]:"+fruit1[0]+"<br/>");
    document.write("fruit-join:"+fruit.join()+"<br/>");
    document.write("fruit1-join:"+fruit1.join()+"<br/>");
    fruit.push("abc");
    fruit1.push("abcd");
    document.write("fruit-push:"+fruit.join()+"<br/>");
    document.write("fruit1-push:"+fruit1.join()+"<br/>");
    document.write("fruit1-typeof:"+typeof(fruit)+"<br/>");
    document.write("fruit1-typeof:"+typeof(fruit1)+"<br/>");






</script>
</body>
</html>